#!/usr/bin/python
# -*- coding: UTF-8 -*-
import json
import requests

url = "http://www.tuling123.com/openapi/api"
key = "eeee08795f544a0f9d1c2535827729e7"




while True:
    info = input("我:")
    data = {"key": key, "info": info, "loc": "北京中关村", "userid": "123"}
    r = requests.post(url,data=data)
    x = r.text
    y = json.loads(x)
    print("机器人："+y['text'])